package com.lzk.工厂模式.工厂方法.order;

import com.lzk.工厂模式.工厂方法.pizza.BJCheesePizza;
import com.lzk.工厂模式.工厂方法.pizza.BJPepperPizza;
import com.lzk.工厂模式.工厂方法.pizza.Pizza;

/**
 * author: 刘中魁
 */
public class BJOrderPizza extends OrderPizza {
    @Override
    Pizza createPizza(String orderType) {
        Pizza pizza = null;
        if (orderType.equals("cheese")) {
            pizza = new BJCheesePizza();

        } else if (orderType.equals("pepper")) {
            pizza = new BJPepperPizza();

        }
        return pizza;
    }
}
